<?php
/**
 * @copyright  For copyright and license information, read the COPYING.txt file.
 * @link       /COPYING.txt
 * @license    Academic Free License (AFL 3.0)
 * @package     default_default
 */

/** @var Mage_Adminhtml_Block_Template $this */
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noindex, nofollow" />
    <title><?php echo Mage::helper('adminhtml')->__('Reset a Password') ?></title>
    <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('login.css') ?>" media="all" />
    <link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon" />
    <script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/prototype.js') ?>"></script>
    <script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/validation.js') ?>"></script>
    <script type="text/javascript" src="<?php echo $this->getJsUrl('scriptaculous/effects.js') ?>"></script>
    <script type="text/javascript" src="<?php echo $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
    <script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>
</head>
<body id="page-login">
    <div class="login-container">
        <div class="login-box">
            <form method="post" action="<?php echo $this->getUrl('*/*/resetpasswordpost', ['_query' => ['id' => $userId, 'token' => $resetPasswordLinkToken]]) ?>" id="reset-password-form">
                <fieldset class="login-form">
                    <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
                    <h2><?php echo Mage::helper('adminhtml')->__('Reset a Password') ?></h2>
                    <div id="messages">
                        <?php echo $this->getMessagesBlock()->toHtml() ?>
                    </div>
                    <div class="input-box f-left">
                        <label for="password"><em class="required">*</em> <?php echo $this->__('New Password') ?></label><br />
                        <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
                        <input type="password" class="input-text no-display" name="dummy" id="dummy" />
                        <input type="password" class="input-text required-entry validate-admin-password min-admin-pass-length-<?php echo $minAdminPasswordLength ?>" name="password" id="password" autofocus="autofocus" autocomplete="new-password" />
                        <p class="note"><span><?php echo Mage::helper('adminhtml')->__('Password must be at least of %d characters.', $minAdminPasswordLength) ?></span></p>
                    </div>
                    <div class="input-box f-right">
                        <label for="confirmation"><em class="required">*</em> <?php echo $this->__('Confirm New Password') ?></label><br />
                        <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
                        <input type="password" class="input-text no-display" name="dummy" id="dummy2" />
                        <input type="password" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" autocomplete="new-password" />
                    </div>
                    <div class="clear"></div>
                    <div class="form-buttons">
                        <a class="left" href="<?php echo $this->getUrl('adminhtml', ['_nosecret' => true]) ?>">&laquo; <?php echo Mage::helper('adminhtml')->__('Back to Login') ?></a>
                        <input type="submit" class="forgot-password form-button" value="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('adminhtml')->__('Reset Password')) ?>" />
                    </div>
                </fieldset>
                <p class="legal"><?php echo Mage::helper('adminhtml')->__('Powered by OpenMage') ?></p>
            </form>
            <div class="bottom"></div>
            <script type="text/javascript">
                var resetPasswordForm = new varienForm('reset-password-form');
            </script>
        </div>
    </div>
</body>
</html>
